{% extends 'layout.html.twig' %}

{% set lang = app.request.getLocale() %}

{% if lang == 'en' %}
  {% do script(['libs/vue.js','libs/item-bank/lib/itemBank.umd.min.js', 'libs/item-bank/lib/locale/en-US.js', 'app/js/answer-engine/answer/index.js']) %}
{% else %}
  {% do script(['libs/vue.js','libs/item-bank/lib/itemBank.umd.min.js','app/js/answer-engine/answer/index.js']) %}
{% endif %}

{% block stylesheets %}
  {{ parent() }}
  {% if maincolor != 'default' and setting('theme.code', 'jianmo') == 'jianmo' %}
    <link href="{{ asset('static-dist/libs/item-bank/lib/styles/item-bank-' ~ maincolor ~ '.css') }}" rel="stylesheet" />
  {% else %}
    <link href="{{ asset('static-dist/libs/item-bank/lib/styles/item-bank.css') }}" rel="stylesheet" />
  {% endif %}
{% endblock %}


{% block body %}
  <style>
    html, body {
      height: 100%;
      overflow: auto;
      -webkit-overflow-scrolling: touch;
    }  
  </style>
  {% include 'answer-engine/common.html.twig' %}
  {% include 'attachment-upload/upload-data.html.twig' %}
  <input type="hidden" name="assessment" value='{{ assessment|json_encode }}'>
  <input type="hidden" name="assessment_response" value='{{ assessmentResponse|json_encode }}'>
  <input type="hidden" name="answer_scene" value='{{ answerScene|json_encode }}'>
  <input type="hidden" name="answer_record" value='{{ answerRecord|json_encode }}'>
  <input type="hidden" name="submit_goto_url" value='{{ app.request.query.get('submit_goto_url') }}'>
  <input type="hidden" name="save_goto_url" value='{{ app.request.query.get('save_goto_url') }}'>
  {{ render(controller('AppBundle:FaceInspection/Capture:inspection', {request:app.request, answerSceneId: answerScene.id, answerRecordId: answerRecord.id})) }}
{% endblock %}